import { ICarmera, IThreeParams } from '@/types/threeJs';
import { proxy } from 'umi';

// store
const state: IThreeParams = proxy({
  camera: {
    fov: 90,
    aspect: 2,
    near: 0.1,
    far: 1000,
  },
});

// actions
const actions = {
  setCamera: (key: keyof ICarmera, value: number) => {
    state.camera[key] = value;
  },
};

export { actions, state };
